<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/vue.js"></script>
    <style>
        .fade-enter,
        .fade-leave-to {
            opacity: 0;
        }
        .fade-enter-active,
        .fade-leave-active {
            -webkit-transition: opacity 1s;
            -moz-transition: opacity 1s;
            -ms-transition: opacity 1s;
            -o-transition: opacity 1s;
            transition: opacity 1s;
        }
    </style>
</head>
<body>
    <div id="root">
        <transition-group name="fade">
            <div v-for="item of list" key="item.id">{{item}}</div>
        </transition-group>
        <button @click="handleBtnClick">add</button>
    </div>
    <script>
        let count = 0
        let vm = new Vue({
            el:"#root",
            data: {
                list: []
            },
            methods: {
                handleBtnClick: function () {
                    this.list.push({
                        id: count++,
                        title: "hello"
                    })
                }
            }
        })
    </script>
</body>
</html>